import { createRouter, createWebHistory } from 'vue-router'
import UserLoginView from '../views/User/UserLoginView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Login',
      component: UserLoginView,
    },
    {
      path: '/HomeView',
      name: 'HomeView',
      component: () => import('../views/HomeView.vue'),
      children: [
        {
          path: '/ShowMeeting',
          name: 'ShowMeeting',
          component: () => import('../views/MeetingRoomView/ShowMeeting.vue'),
        },
        {
          path: '/GetUserView',
          name: 'GetUserView',
          component: () => import('../views/User/GetUserView.vue'),
        },
        {
          path: '/Frontpage',
          name: 'Frontpage',
          component: () => import('../views/Frontpage.vue'),
        },
        {
          path: '/NlogIn',
          name: 'NlogIn',
          component: () => import('../views/Nlog/Nlog.vue'),
        },
        {
          path: '/MeetingAppointment',
          name: 'MeetingAppointment',
          component: () => import('../views/MeetingView/MeetingAppointment.vue'),
        },
        {
          path: '/approval',
          name: 'approval',
          component: () => import('../views/MeetingApproval/Approval.vue'),
        },
      ]
    },
  ],
})

export default router
